/* 现代化UI组件样式 */

/* 现代化按钮样式 */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-modern:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #d68910);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* 现代化卡片设计 */
.card-modern {
    border-radius: 12px;
    background: white;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* 深色模式下的现代化卡片 */
body.dark-mode .card-modern {
    background-color: #334155;
    color: #e2e8f0;
}

/* 现代化表单元素 */
.input-modern {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: white;
    color: #333;
}

.input-modern:focus {
    border-color: #9b59b6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

/* 深色模式下的表单元素 */
body.dark-mode .input-modern {
    background-color: #475569;
    border-color: #64748b;
    color: #e2e8f0;
}

body.dark-mode .input-modern:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

/* 联系方式样式 */
.contact-info {
    padding: 15px 0;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background-color: rgba(155, 89, 182, 0.1);
}

.contact-item strong {
    color: #2c3e50;
}

body.dark-mode .contact-item {
    background-color: rgba(155, 89, 182, 0.2);
}

body.dark-mode .contact-item strong {
    color: #ecf0f1;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .controls {
        flex-direction: column;
    }
    
    .search-group {
        width: 100%;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px;
    }
    
    .stats-bar {
        flex-direction: column;
        text-align: center;
    }
    
    /* 移动端隐藏部分列 */
    .hide-on-mobile {
        display: none;
    }
    
    /* 垂直堆叠表单 */
    .input-group {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* 移动端卡片式布局 */
    .mobile-card {
        border: 1px solid #ddd;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    body.dark-mode .mobile-card {
        background: #34495e;
        border-color: #3d566e;
    }
    
    /* 移动端联系模块 */
    .contact-items {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .contact-item {
        width: 100%;
        justify-content: space-between;
        padding: 12px;
    }
    
    .qrcode {
      width: 32px;
      height: 32px;
    }
    
    /* 特色功能网格调整 */
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* 卡片式布局替代表格 */
    .mobile-card {
        border: 1px solid #ddd;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    body.dark-mode .mobile-card {
        background: #34495e;
        border-color: #3d566e;
    }
    
    .contact-item {
        padding: 12px;
        font-size: 16px;
    }
    
    .qrcode {
      width: 32px;
      height: 32px;
    }
    
    /* 表单元素在小屏幕上调整 */
    input, textarea, select {
        padding: 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .card {
        padding: 20px;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(155, 89, 182, 0.3);
    border-radius: 50%;
    border-top-color: #9b59b6;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 渐变进度条 */
.progress-gradient {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #9b59b6, #3498db, #27ae60);
    width: 0%;
    transition: width 0.5s ease;
}

/* 淡入淡出效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 特色功能网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.feature-card p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

/* 深色模式下的特色功能卡片 */
body.dark-mode .feature-card {
    background: #3d566e;
}

body.dark-mode .feature-card h3 {
    color: #ecf0f1;
}

body.dark-mode .feature-card p {
    color: #bdc3c7;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .table-header, .table-row {
        flex-direction: column;
    }
    
    .table-cell {
        width: 100%;
        border-bottom: 1px solid #eee;
        padding: 8px 0;
    }
    
    body.dark-mode .table-cell {
        border-bottom-color: #3d566e;
    }
    
    .table-cell:last-child {
        border-bottom: none;
    }
    
    .title-cell, .detail-cell {
        flex: 1;
    }
}